# Contributor: Al-Hassan Abdel-Raouf <alhassanaraouf@disroot.org>
# Maintainer: Al-Hassan Abdel-Raouf <alhassanaraouf@disroot.org>
pkgname=tre
pkgver=0.8.0
pkgrel=0
pkgdesc="POSIX compliant regexp matching library"
options="!check" # No testsuite
url="https://laurikari.net/tre"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-static $pkgname-dev agrep agrep-doc"
source="https://laurikari.net/tre/tre-$pkgver.tar.bz2"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

agrep() {
	pkgdesc="approximate grepping"
	amove usr/bin/agrep
}

sha512sums="db7465993e0d25eee8e52f974427b8a040234cf0f017769eb94ee88bc6261821336aad7f762bfa82db7e2212d8449bc221592586f061c528a59a550773cbc263  tre-0.8.0.tar.bz2"
